package com.csj.lc.func;


import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;

@Component
//@Configurable
//@EnableScheduling
public class MyQuarts {

//    @Scheduled(cron = "*/5 * * * * ?")
    private void run10Seconds(){

        // 定时输出时间
//        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
//        System.out.println("Time : " + df.format(new Date()));// new Date()为获取当前系统时间

    }


}
